package com.example.tests;

public class ContactDate implements Comparable<ContactDate> {
	private String first;
	private String last;
	private String address;
	private String telephoneHome;
	private String telephoneMobile;
	private String telephoneWork;
	private String email;
	private String email2;
	private String birthDay;
	private String birthMonth;
	private String birthYear;
	private String address2;
	private String telephoneHome2;

	public ContactDate() {
	}

	public ContactDate(String first, String last, String address,
			String telephoneHome, String telephoneMobile, String telephoneWork,
			String email, String email2, String birthDay, String birthMonth,
			String birthYear, String address2, String telephoneHome2) {
		this.first = first;
		this.last = last;
		this.address = address;
		this.telephoneHome = telephoneHome;
		this.telephoneMobile = telephoneMobile;
		this.telephoneWork = telephoneWork;
		this.email = email;
		this.email2 = email2;
		this.birthDay = birthDay;
		this.birthMonth = birthMonth;
		this.birthYear = birthYear;
		this.address2 = address2;
		this.telephoneHome2 = telephoneHome2;
	}

	@Override
	public String toString() {
		return "ContactDate [last=" + last + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((last == null) ? 0 : last.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactDate other = (ContactDate) obj;
		if (last == null) {
			if (other.last != null)
				return false;
		} else if (!last.equals(other.last))
			return false;
		return true;
	}

	@Override
	public int compareTo(ContactDate other) {
		return this.last.toLowerCase().compareTo(other.last.toLowerCase());
	}

	public ContactDate withFirst(String first) {
		this.first = first;
		return this;
	}

	public ContactDate withLast(String last) {
		this.last = last;
		return this;
	}

	public ContactDate withAddress(String address) {
		this.address = address;
		return this;
	}

	public ContactDate withTelephoneHome(String telephoneHome) {
		this.telephoneHome = telephoneHome;
		return this;
	}

	public ContactDate withTelephoneMobile(String telephoneMobile) {
		this.telephoneMobile = telephoneMobile;
		return this;
	}

	public ContactDate withTelephoneWork(String telephoneWork) {
		this.telephoneWork = telephoneWork;
		return this;
	}

	public ContactDate withEmail(String email) {
		this.email = email;
		return this;
	}

	public ContactDate withEmail2(String email2) {
		this.email2 = email2;
		return this;
	}

	public ContactDate withBirthDay(String birthDay) {
		this.birthDay = birthDay;
		return this;
	}

	public ContactDate withBirthMonth(String birthMonth) {
		this.birthMonth = birthMonth;
		return this;
	}

	public ContactDate withBirthYear(String birthYear) {
		this.birthYear = birthYear;
		return this;
	}

	public ContactDate withAddress2(String address2) {
		this.address2 = address2;
		return this;
	}

	public ContactDate withTelephoneHome2(String telephoneHome2) {
		this.telephoneHome2 = telephoneHome2;
		return this;
	}

	public String getFirst() {
		return first;
	}

	public String getLast() {
		return last;
	}

	public String getAddress() {
		return address;
	}

	public String getTelephoneHome() {
		return telephoneHome;
	}

	public String getTelephoneMobile() {
		return telephoneMobile;
	}

	public String getTelephoneWork() {
		return telephoneWork;
	}

	public String getEmail() {
		return email;
	}

	public String getEmail2() {
		return email2;
	}

	public String getBirthDay() {
		return birthDay;
	}

	public String getBirthMonth() {
		return birthMonth;
	}

	public String getBirthYear() {
		return birthYear;
	}

	public String getAddress2() {
		return address2;
	}

	public String getTelephoneHome2() {
		return telephoneHome2;
	}

}